package jmine.tec.datadigester.positional.checker;

import java.lang.reflect.Method;

import org.apache.commons.lang.math.IntRange;

/**
 * Guarda informações necessárias para validação posicional
 * 
 * @author israel.crisanto
 */
public class PositionalTypeRange {
    private final IntRange range;

    private final String methodName;

    public PositionalTypeRange(Method method, int start, int size) {
        super();
        this.range = new IntRange(start, start + size - 1);
        this.methodName = method.getName();
    }

    /**
     * @return the method
     */
    public String getMethodName() {
        return this.methodName;
    }

    public int getStart() {
        return this.range.getMinimumInteger();
    }

    public int getEnd() {
        return this.range.getMaximumInteger();
    }

    public IntRange getRange() {
        return this.range;
    }
}
